From: Wen Congyang Date: Tue, 19 Jan 2016 07:17:41 +0000 (+0800) Subject: tools/libxc: error handling for the postcopy() callback X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1911 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22%22?a=commitdiff_plain;h=8bb1c7abdaa2a5654a44a76da60d5bd233026919;p=xen.git tools/libxc: error handling for the postcopy() callback Signed-off-by: Wen Congyang Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index e532168181..e4ba56048a 100644 --- a/tools/libxc/xc_sr_save.c +++ b/tools/libxc/xc_sr_save.c @@ -791,7 +791,9 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type) if ( rc ) goto err; - ctx->save.callbacks->postcopy(ctx->save.callbacks->data); + rc = ctx->save.callbacks->postcopy(ctx->save.callbacks->data); + if ( rc <= 0 ) + goto err; rc = ctx->save.callbacks->checkpoint(ctx->save.callbacks->data); if ( rc <= 0 )